package wmh.day01092.constants;

    /**
     * 行程状态枚举类
     */
    public enum Tour_RouteType {
        ONE(0, "玩团"),
        TWO(1, "自由行");

        private int code;
        private String value;

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }

        Tour_RouteType(int code, String value) {
            this.code = code;
            this.value = value;
        }

        /**
         * 对外提供的公共获取对应枚举类的方法
         */
        public static Tour_RouteType getTour_RouteTypeByCode(int code) {
            switch (code) {
                case 0:
                    return ONE;
                case 1:
                    return TWO;
                default:
                    return ONE;
            }
        }
    }